package tt.lab.designparttern.proxy;

import java.lang.reflect.Proxy;

public class Test {
	public static void main(String[] args) {
		Target target = new TargetImpl();
		MyInvocationHandler traceHandler = new MyInvocationHandler(target);
		Target targetProxy = (Target)Proxy.newProxyInstance(Target.class.getClassLoader(), new Class[] { Target.class }, traceHandler);
		targetProxy.test();
		
		int i = targetProxy.add(11, 12);
		System.out.println("Test.main(): "+i);
		
	}
}